package com.jy.service.impl;

import com.jy.entity.CwLsparking;
import com.jy.entity.PageInfo;
import com.jy.mapper.CwLsparkingMapper;
import com.jy.service.ICwLsparkingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 临时车位费 服务实现类
 * </p>
 *
 * @author WeiQuan
 * @since 2022-11-14
 */
@Service
public class CwLsparkingServiceImpl extends ServiceImpl<CwLsparkingMapper, CwLsparking> implements ICwLsparkingService {

    @Resource
    private CwLsparkingMapper cw;
//  查询临时停车费 分页
    @Override
    public PageInfo allCwLsparking(PageInfo pageInfo) {
        pageInfo.setTotalRow(cw.selcwlsparkingcount());
        pageInfo.setDatas(cw.allCwLsparking(pageInfo));//根据开始行和每页行数 查当前页数据
        return pageInfo;
    }
//  添加临时停车费数据
    @Override
    public int addcwlsparking(CwLsparking cwLsparking) {
        return cw.addcwlsparking(cwLsparking);
    }
//  删除临时停车费数据
    @Override
    public int delCwLsparking(Integer lid) {
        return cw.delCwLsparking(lid);
    }
//  修改临时停车费数据
    @Override
    public int upCwLsparking(CwLsparking cwLsparking) {
        return cw.upCwLsparking(cwLsparking);
    }
}
